package com.xuecheng.media.api;

import com.xuecheng.commons.model.vo.MediaVo;
import com.xuecheng.commons.model.vo.ResourceVo;
import com.xuecheng.commons.model.vo.ResponseResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @author HuangYuwu
 * @CreateTime 2022/9/13 15:50
 */
@FeignClient("xc-media-service")
public interface MediaClient {
    /**
     * 根据id查询媒资信息
     * @param mediaId
     * @return
     */
    @GetMapping("/media/{mediaId}")
    public ResponseResult<MediaVo> findMeidaById(@PathVariable("mediaId") Long mediaId);

    /**
     * 根据id查询媒资播放地址
     * @param mediaId
     * @return
     */
    @GetMapping("/media/media-url/{mediaId}")
    public ResponseResult<ResourceVo> findMediaUrl(@PathVariable("mediaId")Long mediaId);
}
